#ifndef BUILDING_H
#define BUILDING_H

#include "entities/entity.h"

class Building:public Entity{
    public:
        Building();

        void Update();
        void EndTurn();

        void SetPrerequisite( std::string prereq ){ prerequisite = prereq; }
        void SetReplaces( std::string repl ){ replaces = repl; }
        void SetCanBeBuiltInsideCity( bool can ){ buildInsideCity = can; }
        void SetCanBeBuiltOutsideCity( bool can ){ buildOutsideCity = can; }
        void SetProduction( int prod ){ production = prod; }
        void SetResearchPrerequisites(std::vector<std::string> pre){ researchPrereqs = pre; }
        void SetFarmingDistance(float dist){ farming_distance = dist; }
        void SetAdministrativeDistance(float dist){ administrative_distance = dist; }
        void SetPopulationLimit(int lim){ population_limit = lim; }

        std::string GetPrerequisite(){ return prerequisite; }
        std::string GetReplaces(){ return replaces; }

        bool HasPrerequisite(){ if(prerequisite=="none") return false; else return true; }
        bool ReplacesSomething(){ if(replaces=="none") return false; else return true; }

        bool CanBeBuiltInsideCity(){ return buildInsideCity; }
        bool CanBeBuiltOutsideCity(){ return buildOutsideCity; }
        int GetProduction(){ return production; }
        float GetFarmingDistance(){ return farming_distance; }
        float GetAdministrativeDistance(){ return administrative_distance; }
        int GetPopulationLimit(){ return population_limit; }

        virtual std::set<std::string> GetConstructionOptionNames();
        virtual std::set<std::string> GetImprovementOptionNames();

    private:
        float farming_distance;
        float administrative_distance;
        int population_limit;

        int production;

        bool buildOutsideCity;
        bool buildInsideCity;

        std::string prerequisite;
        std::string replaces;

        std::vector<std::string> researchPrereqs;
};

#endif
